package com.youxue.dao;

import com.youxue.entity.Comment;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommentMapper {
    int deleteByPrimaryKey(Integer commentId);

    int insert(Comment record);

    int insertSelective(Comment record);

    Comment selectByPrimaryKey(Integer commentId);

    int updateByPrimaryKeySelective(Comment record);

    int updateByPrimaryKey(Comment record);

    List<Comment> selectAClassAllCommentByPage(@Param(value = "startPos") Integer startPos,
                                               @Param(value = "pageSize") Integer pageSize,
                                               @Param(value = "commentClassId") Integer commentClassId);

    Comment selectACommentInfo(Integer commentId);

    int selectUserIdACommentForDelete(Integer commentId);

    int SelectAClassAllCommentCount(@Param(value = "commentClassId") Integer commentClassId);

    List<Integer> selectAllComment();

    double selectSumAClassTotalScore(@Param(value = "classId") Integer classId);
}